package Backend.Algorithmen;

import GUI.Cell;

public abstract class SuperAlgo {
	
	private String name;
	public Cell[][] grid;
	protected int xcount,ycount;
	protected int available_cells;
	protected boolean isRunning = false;
	protected int status = 0;
	private int delay = 0;
	
	private long time = 0;

	public SuperAlgo(String name){
		this.name = name;
	}
	
	public String getName(){
		return name;
	}
	
	@Override
	public String toString() {
		return name;
	}
	
	public void setGrid(Cell[][] grid){
		this.grid = grid;
	}
	
	public void setXYCount(int x, int y){
		xcount = x;
		ycount = y;
		available_cells = x*y;
	}
	
	public long getTime(){
		return time;
	}
	
	public int getDelay() {
		return delay;
	}

	public void setDelay(int delay) {
		this.delay = delay;
	}

	public boolean isRunning() {
		return isRunning;
	}

	public void setRunning(boolean isRunning) {
		this.isRunning = isRunning;
	}

	public void setTime(long t){
		time = t;
	}
	
	public int getStatus(){
		return status;
	}
	
	public void setStatus(int st){
		status = st;
	}
	
	abstract public void start(boolean slow);
}
